package com.changgou.goods.dao;

import com.changgou.goods.pojo.Para;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface ParaMapper extends Mapper<Para> {
    /**
     * 根据分类名称查询参数信息
     * @param categoryName
     * @return
     */
    @Select("SELECT DISTINCT p.name,p.options FROM tb_category c,tb_para p WHERE c.template_id=p.template_id AND c.name=#{name}")
    public List<Map> findParaListByCategoryName(@Param("name") String categoryName);

}
